package com.xomily.devops.agent.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * @version V1.0
 * @ClassName:DevMemLog.java
 * @author: xomily (2327742507@qq.com)
 * @date: 2021年12月02日
 * @Description: DevMemLog.java
 * @Copyright: 2021-2022 www.xomily.com. All rights reserved.
 */
public class DevMemLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 主机IP地址 */
    private String ip;

    /** 合计 */
    private Long total;

    /** 已用 */
    private Long used;

    /** 可用 */
    private Long free;

    /** 使用率 */
    private double useRate;

    /** 发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date generateTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setTotal(Long total) 
    {
        this.total = total;
    }

    public Long getTotal() 
    {
        return total;
    }
    public void setUsed(Long used) 
    {
        this.used = used;
    }

    public Long getUsed() 
    {
        return used;
    }
    public void setFree(Long free) 
    {
        this.free = free;
    }

    public Long getFree() 
    {
        return free;
    }
    public void setUseRate(double useRate) 
    {
        this.useRate = useRate;
    }

    public double getUseRate() 
    {
        return useRate;
    }
    public void setGenerateTime(Date generateTime) 
    {
        this.generateTime = generateTime;
    }

    public Date getGenerateTime() 
    {
        return generateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ip", getIp())
            .append("total", getTotal())
            .append("used", getUsed())
            .append("free", getFree())
            .append("useRate", getUseRate())
            .append("createTime", getCreateTime())
            .append("generateTime", getGenerateTime())
            .toString();
    }
}
